<template>
  <div class="header">
    <div class="logo">电子商务后台管理系统 </div>
    <div class="mytime">今天是 {{ year }} 年 {{ month }} 月 {{ day}}日  星期{{ weekStr }} </div>
  </div>
</template>

<script setup>
  const myDate = new Date();
  const year = myDate.getFullYear();
  const month = myDate.getMonth() + 1;
  const day = myDate.getDate();
  const week = myDate.getDay();
  const weekArr = ['日', '一', '二', '三', '四', '五', '六'];
  const weekStr = weekArr[week];
</script>
<style scoped>
  .header {
		position: relative;
		box-sizing: border-box;
		width: 100%;
		height: 70px;
		font-size: 22px;
		background: #242f42;
		color: #fff;
	}
	
	.header .logo {
		float: left;
		width: 250px;
		line-height: 70px;
	}
	.header .mytime {
		float: left;
		width: 500px;
		line-height: 70px;
	}
</style>